import request from '@/utils/request'

// 查询问题分类列表
export function listCategorization(query) {
  return request({
    url: '/question/categorization/list',
    method: 'get',
    params: query
  })
}

// 查询问题分类详细
export function getCategorization(id) {
  return request({
    url: '/question/categorization/' + id,
    method: 'get'
  })
}

// 新增问题分类
export function addCategorization(data) {
  return request({
    url: '/question/categorization',
    method: 'post',
    data: data
  })
}

// 修改问题分类
export function updateCategorization(data) {
  return request({
    url: '/question/categorization',
    method: 'put',
    data: data
  })
}

// 删除问题分类
export function delCategorization(id) {
  return request({
    url: '/question/categorization/' + id,
    method: 'delete'
  })
}

// 查询问题分类中文名称列表
export function selectChineseNomenclatureList(){
  return request({
    url: '/question/categorization/selectChineseNomenclatureList',
    method: 'get'
  })
}

//修改问题分类的状态
export function updateCategorizationStatus(data){
  return request({
    url: '/question/categorization/updateEQuestionCategorizationStatus',
    method: 'put',
    data: data
  })
}

//修改问题分类的引用状态
export function updateCategorizationReferenceStatus(id){
  return request({
    url: '/question/categorization/updateCategorizationReferenceStatus',
    method: 'put',
    data: id
  })
}
